'use strict';

const pkginfo = require('../../../../package.json');

module.exports = function (app) {
  const router = app.router;
  router.get('/', async ctx => {
    // BUSINESS LOGIC
    const data = {
      name: pkginfo.name,
      version: pkginfo.version,
      description: pkginfo.description,
      author: pkginfo.author
    };

    ctx.res.ok(data, 'Hello, API!');
  });

  router.get('/api', async ctx => {
    ctx.res.ok('apis');
  });
};
